home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK1.toast / Development Kits (Disc 1) / Open Transport / Sample Code / DLPI / ATM PCI DLPI / Sources / PCIRoutines.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-17  |  2.1 KB  |  65 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        PCIRoutines.h
  3.  
  4.     Contains:    This file contains items related to the PCI Bus.
  5.     
  6.     Written by:    
  7.  
  8.     Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.  
  13.     To Do:
  14. */
  15.  
  16.  
  17. #include <Interrupts.h>
  18. #include <PCI.h>
  19. #include <OSUtils.h>
  20. #include <Kernel.h>
  21. #include <DriverServices.h>
  22. #include <Devices.h>
  23. #include <CodeFragments.h>
  24.  
  25. //-----------------------------------------------------------------------------------------
  26. // These offsets are used by the GetPCICardBaseAddress() to obtain base addresses
  27. //-----------------------------------------------------------------------------------------
  28. #define kPCIConfigBase10Offset                0x10
  29. #define kPCIConfigBase14Offset                0x14
  30. #define kPCIConfigBase18Offset                0x18
  31. #define kPCIConfigBase1COffset                0x1C
  32. #define kPCIConfigBase20Offset                0x20
  33. #define kPCIConfigBase24Offset                0x24
  34. #define kPCIConfigBaseROM30Offset            0x30
  35.  
  36.  
  37.  
  38. //-----------------------------------------------------------------------------------------
  39. // PCI Configuration Register Definitions
  40. //    Register Bit Definitions also
  41. //-----------------------------------------------------------------------------------------
  42.  
  43. #define kPCIConfigVendorIDRegister            (LogicalAddress )0x00000000
  44. #define kPCIConfigDeviceIDRegister            (LogicalAddress )0x00000002
  45. #define kPCIConfigCommandRegister            (LogicalAddress )0x00000004
  46. #define            kIOSpaceEnableBit        0x0001
  47. #define            kMemorySpaceEnableBit    0x0002
  48. #define            kBusMasterEnableBit        0x0004
  49. #define kPCIConfigStatusRegister            (LogicalAddress )0x00000006
  50.  
  51.  
  52.  
  53.  
  54. //-----------------------------------------------------------------------------------------
  55. // Function Prototypes
  56. //-----------------------------------------------------------------------------------------
  57.  
  58. extern OSStatus GetPCICardBaseAddress(RegEntryID *theID, UInt32 *baseRegAddress, UInt8 offsetValue,UInt32 *spaceAllocation);
  59. extern OSStatus UninstallISR(void);
  60. extern OSStatus InstallISR(void);
  61. extern OSStatus GetAProperty(RegEntryID *theID, RegPropertyName *prop,RegPropertyValue *val,RegPropertyValueSize *siz);
  62. extern void DisposeProperty(RegPropertyValue *val);
  63.  
  64.  
  65.